function load () {
var map = document.getElementById("map");
if (GBrowserIsCompatible()) {
var gmap = new GMap2(map);
gmap.addControl( new GSmallMapControl() );
gmap.addControl( new GMapTypeControl()) ;
gmap.addControl( new GOverviewMapControl(new GSize(100,100)) );
gmap.setCenter( new GLatLng(54.7,-4), 5 );
} else {
alert("Sorry, your browser cannot handle the true power of Google Maps");
}
}
window.onload = load;
window.onunload = GUnload;


function createMarker(input) {
	alert("cmon");
	var marker = new GMarker(input.point);
	GEvent.addListener(marker, "click", function() {
	marker.openInfoWindowHtml( input.homeTeam + " vs. " + input.awayTeam );
	});
	return marker;
	}
	function parseJson (doc) {
	var jsonData = eval("(" + doc + ")");
	for (var i = 0; i < jsonData.markers.length; i++) {
	var marker = createMarker(jsonData.markers[i]);
	gmap.addOverlay(marker);
	}
	}
	GDownloadUrl("points.json", function(data, responseCode) {
	parseJson(data);
	});



